<template>
<div class="mui-numbox" data-numbox-min='1' style="height:25px;">
    <button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
    <input id="test" class="mui-input-numbox" @change="func" type="number" :value="initcount" ref="shopnum"/>
    <button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
</div>
</template>

<script>
import mui from '../../mui/js/mui.min.js'
export default {
    data(){
        return{
            // val:this.$refs.mycount.value
            // max:this.props.max
            val:1
        }
    },
    mounted(){
        mui('.mui-numbox').numbox()
    },
    methods:{
        func(){
            // console.log(this.val)
            //  console.log(this.$refs.shopnum.value)
             this.$store.commit('updatecartcount',{id:this.shopid,count:this.$refs.shopnum.value})
        }
    },
    props:['initcount','shopid']
}
</script>

<style lang="less" scoped>

</style>